package com.zhangtai.modules.service.salary;

import com.zhangtai.modules.entity.salary.AwardPackageEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;


/**
 * 奖罚包表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-10-19 09:53:57
 */

public interface AwardPackageService {

    @GetMapping("/findAwardPackageList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(@RequestParam(value = "orgIds",required = false) List<Long> orgIds,
                         @RequestParam(value = "serialNum") String serialNum,
                         @RequestParam (value = "applicantName") String applicantName,
                         @RequestParam(value = "applyTimeStart") String applyTimeStart,
                         @RequestParam(value = "applyTimeEnd") String applyTimeEnd,
                         @RequestParam(value = "awardName") String awardName,
                         @RequestParam(value = "distributionStatus") ArrayList<Integer> distributionStatus,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    @GetMapping("/infoAwardPackage")
    @ApiOperation(value = "根据id查找")
    AwardPackageEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveAwardPackage")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody AwardPackageEntity entity);

    @PostMapping("/updateAwardPackage")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody AwardPackageEntity entity);

    @GetMapping("/deleteOneAwardPackage")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteAwardPackages")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

